class CreateBookings < ActiveRecord::Migration
  def self.up
    create_table :bookings do |t|
      t.column "name",              :string, :limit => 255, :default => "", :null => false
      t.column "email_address",     :string, :limit => 255, :default => "", :null => false
      t.column "arrival_date",      :date, :null => false
      t.column "arrival_time",      :time, :null => false
      t.column "number_of_nights",  :int, :default => 1, :null => false
      t.column "number_of_guests",  :int, :default => 1, :null => false
      t.column "number_of_lodges",  :int, :default => 1, :null => false
      t.column "pickup_service",    :boolean, :default => false, :null => false
      t.column "pickup_location",   :string, :limit => 255, :default => "", :null => false
      t.column "comment",           :text, :null => true
      t.column "created_at",        :timestamp, :null => false
    end
  end

  def self.down
    drop_table :bookings
  end
end
